package com.myioc.entity;


import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.junit.Test;

public class MyIOCTest {
	
	@Test
	public void myIOCTest() throws Exception {
		
		//初始化ioc容器
		
		mysqlClassPashXmlApplicationContext ioc=new mysqlClassPashXmlApplicationContext("src/main/java/com/myioc/entity/applicationContext01.xml");
		
		//拿到对象
		StudentEntity student=(StudentEntity)ioc.getBean("liuhao");
		System.out.println(student);
		
		/*TeacherEntity teacher=(TeacherEntity)ioc.getBean("scott");
		System.out.println(teacher);
		*/
		
	}
	
	@Test
	public void entrySet() throws Exception {
		
		Map<String,Object> map=new HashMap<String,Object>();
		map.put("liuhao", "xx");
		map.put("zp","oo");
		
		Set<Entry<String,Object>> entrySet = map.entrySet();
		for (Entry<String, Object> entry : entrySet) {
			System.out.println(entry.getKey());
		}
		
	}

}
